import request from '@/utils/request'

// 查询考勤记录列表
export function listSign(query) {
  console.log(query)
  return request({
    url: '/tongban/sign/list',
    method: 'get',
    params: query
  })
}

// 查询考勤记录详细
export function getSign(recordId) {
  return request({
    url: '/tongban/sign/' + recordId,
    method: 'get'
  })
}

// 新增考勤记录
export function addSign(data) {
  return request({
    url: '/tongban/sign',
    method: 'post',
    data: data
  })
}

// 修改考勤记录
export function updateSign(data) {
  return request({
    url: '/tongban/sign',
    method: 'put',
    data: data
  })
}

// 删除考勤记录
export function delSign(recordId) {
  return request({
    url: '/tongban/sign/' + recordId,
    method: 'delete'
  })
}

// 导出考勤记录
export function exportSign(query) {
  return request({
    url: '/tongban/sign/export',
    method: 'get',
    params: query
  })
}
